package com.tongji.housediy.model
{
	import com.tongji.housediy.events.goodsEvent.DataDoneEvent;
	import com.tongji.housediy.vo.Goods;
	import com.tongji.housediy.vo.GoodsSort;
	import com.tongji.housediy.vo.StatisticData;
	
	import mx.collections.ArrayCollection;
	import mx.controls.Alert;
	
	import org.robotlegs.mvcs.Actor;
	
	/**
	 * 
	 * @author liaoruohuai
	 * 2011-4-8
	 */
	[Bindable]
	public class SearchResultModel extends Actor
	{
		public var searchResultArray:ArrayCollection;
		
		public var brandPicSrc:String = "";
		
		public var GoodsTypeCount:int;
		public var TypeGoodsCount:Array;//数据预处理
		
		public var total:int = 0;		
		
		public function updateSearchResultModel(searchResultArray:ArrayCollection):void
		{	
			if (searchResultArray == null)
			{
				
			}
			else
			{
				this.searchResultArray = searchResultArray;
				for each(var goodsSort:GoodsSort in searchResultArray)
				{
					total = total + goodsSort.goodsList.length;
				}	
			}

			/*if (searchGoodsBrandModel.length > 0)
			{
							
			}
			else if (searchGoodsBrandModel.length == 0)
			{
				searchGoodsArrayCollection.removeAll();
				total = 0;
			}*/
		}
		
	}
}